<?php
/* @var $this MetasController */
/* @var $model Metas */
?>

<?php
$this->breadcrumbs = array(
	'Metases' => array('index'),
	$model->metaId,
);
?>

<div class="row-fluid">
    <div class="span12">
        <div class="grid simple">
			<div class="grid-title no-border">
				<br />
			</div>
			<div class="grid-body no-border">
				<?php
				$a = array('faq' => 'Вопросы и ответы', 'page' => 'Страницы');
				$this->widget('zii.widgets.CDetailView', array(
					'htmlOptions' => array(
						'class' => 'table table-striped table-condensed table-hover',
					),
					'data' => $model,
					'attributes' => array(
						'metaId',
						array(
							'name' => 'itemType',
							'value' => isset($a[$model->itemType]) ? $a[$model->itemType] : '2',
							'type' => 'raw',
						),
						array(
							'name' => 'itemId',
							'value' => $model->itemType == 'page' ? Page::model()->findByPk($model->itemId)->pageTitle : Faq::model()->findByPk($model->itemId)->faqTitle,
							'type' => 'raw',
						),
						'metaTitle',
						'metaDesc',
						'metaKeywords',
						'metaRobots',
						'metaH1',
					),
				));
				?>
			</div>
        </div>	
    </div>
</div>